#ifndef GERMPROCESSOR_H_
#define GERMPROCESSOR_H_

#include <MTXml/MTXml.h>
#include <MAUtil/String.h>
#include "DTO.h"

using namespace MAUtil;
using namespace Mtx;

class GERMProcessor : public XmlListener
{
  public:
    GERMProcessor();
    ~GERMProcessor();

    //XmlListener
    void mtxEncoding(const char* value);
    void mtxTagStart(const char* name, int len);
    void mtxTagAttr(const char* attrName, const char* attrValue);
    void mtxTagStartEnd();
    void mtxTagData(const char* data, int len);
    void mtxTagEnd(const char* name, int len);
    void mtxParseError();
    void mtxEmptyTagEnd();
    unsigned char mtxUnicodeCharacter(int unicode);

    //Property setters
    void setGERMListener(GERMListener* listener);
    void addRequest(String& url, GERMListener* requester);
    void setCompanyId(String& value);

  private:
    enum GERM_Tags
    {
    	GERM_NULL,
    	GERM_NAME,
    	GERM_ID,
    	GERM_DIGIT

    } mGERMTag;

    GERMListener* mListener;
    GERMItem mCurrentItem;
    String mCompanyId;
    String temp;
    String mFirstTag;
    bool mInBody;
    bool mInItem;
};


#endif /* GERMPROCESSOR_H_ */
